package com.wwlwxg.geo;

import com.github.zhangchunsheng.amapgeo.bean.result.GeoResult;
import com.github.zhangchunsheng.amapgeo.config.AmapGeoConfig;
import com.github.zhangchunsheng.amapgeo.exception.AmapGeoException;
import com.github.zhangchunsheng.amapgeo.service.GeoService;
import com.github.zhangchunsheng.amapgeo.service.impl.GeoServiceImpl;

public class GeoTest {

	public static void main(String[] args) throws AmapGeoException {
		// spring boot, inject geoService
		GeoService geoService = new GeoServiceImpl();
		AmapGeoConfig config = new AmapGeoConfig();
		config.setKey("");

		geoService.setConfig(config);

		GeoResult result = geoService.geo("北京市朝阳区阜通东大街6号");
		System.out.println(result);
	}
}
